//
//  ActHotTableViewCell.m
//  TravelFirst
//
//  Created by lanou3g on 15/9/20.
//  Copyright (c) 2015年 吴娅君. All rights reserved.
//

#import "ActHotTableViewCell.h"

@implementation ActHotTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier typeArr:(NSMutableArray *)arr{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if(self){
        
        UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, kWidth, 240)];
        view.backgroundColor = [UIColor colorWithRed:76%256/255 green:217%256/255 blue:58%256/255 alpha:0.05];
        
        
        self.selectionStyle = 0;
        self.title = [[UILabel alloc] initWithFrame:CGRectMake(10, 20, kWidth-20, 30)];
        _title.numberOfLines = 0;
        _title.font = [UIFont boldSystemFontOfSize:14];
        
        self.hot = [[UIImageView alloc] initWithFrame:CGRectMake(kWidth - 40, 10, 30, 30)];
        
        for(int i = 0; i <arr.count;i++){
            self.type = [[UILabel alloc] initWithFrame:CGRectMake(i * 40 + 10, 60, 30, 20)];
            _type.text = arr[i];
            _type.textAlignment = 1;
            _type.font = [UIFont boldSystemFontOfSize:12];
            _type.backgroundColor = [UIColor greenColor];
            [self.contentView addSubview:_type];
        }
        
        self.city = [[UILabel alloc] initWithFrame:CGRectMake(12, 90, 200, 30)];
        _city.font = [UIFont boldSystemFontOfSize:13];
        
        self.time = [[UILabel alloc] initWithFrame:CGRectMake(12, 130, 150, 30)];
        _time.font = [UIFont boldSystemFontOfSize:13];
        _time.textColor = [UIColor blackColor];
        
        self.cost = [[UILabel alloc] initWithFrame:CGRectMake(12, 165, 40, 30)];
        _cost.text = @"费用:";
        _cost.font = [UIFont boldSystemFontOfSize:14];
        _cost.textColor = [UIColor blackColor];
        
        self.Money = [[UILabel alloc] initWithFrame:CGRectMake(50,165, 150, 30)];
        _Money.textColor = [UIColor orangeColor];
        _Money.font = [UIFont boldSystemFontOfSize:13];
        
        self.logo = [[UIImageView alloc] initWithFrame:CGRectMake(12, 200, 30, 30)];
        
        self.club = [[UILabel alloc] initWithFrame:CGRectMake(70, 200, 70, 30)];
        _club.font = [UIFont boldSystemFontOfSize:13];
        
        self.picture = [[UIImageView alloc] initWithFrame:CGRectMake(220, 100, 130, 130)];
        
        [self.contentView addSubview:view];
        [view addSubview:_title];
        [view addSubview:_city];
        [view addSubview:_time];
        [view addSubview:_cost];
        [view addSubview:_Money];
        [view addSubview:_logo];
        [view addSubview:_club];
        [view addSubview:_picture];
        [view addSubview:_hot];
        
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
